package com.javaweb.blogcite.controller.vo;

import com.javaweb.blogcite.pojo.BlogType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BlogTypeView {
    private Integer id;
    private String name;
    private Integer articleCount;
    private Integer order;

    public BlogTypeView(BlogType blogType) {
        this.id = blogType.getId();
        this.name = blogType.getName();
        this.articleCount = blogType.getBlogCount();
        this.order = blogType.getOrder();
    }
}
